{extend name="layout/base" /}

{block name="css"}
<style>
/* 首页特定样式 */
.hero-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    border-radius: 20px;
    text-align: center;
    padding: 80px 40px;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color) 0%, #3498db 50%, var(--primary-color) 100%);
    border-radius: 20px 20px 0 0;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(44, 90, 160, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #2c3e50;
    position: relative;
    z-index: 2;
    background: linear-gradient(135deg, #2c3e50 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 20px;
    color: #6c757d;
    margin-bottom: 40px;
    font-weight: 400;
    line-height: 1.6;
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 36px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3f73 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(44, 90, 160, 0.3);
    position: relative;
    z-index: 2;
    border: none;
    overflow: hidden;
}

.hero-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.hero-cta:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 32px rgba(44, 90, 160, 0.4);
    color: white;
    text-decoration: none;
}

.hero-cta:hover::before {
    left: 100%;
}

.hero-cta:active {
    transform: translateY(-1px) scale(1.01);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.feature-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f1f3f4;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, #3498db 100%);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 56px;
    margin-bottom: 24px;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.feature-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #2c3e50;
}

.feature-description {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 24px;
    font-size: 15px;
}

.feature-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3f73 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(44, 90, 160, 0.3);
    position: relative;
    overflow: hidden;
}

.feature-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.feature-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 90, 160, 0.4);
    color: white;
    text-decoration: none;
}

.feature-link:hover::before {
    left: 100%;
}

.about-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 40px;
    border: 1px solid #e9ecef;
}

.about-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #2c3e50;
    text-align: center;
}

.about-content {
    font-size: 16px;
    line-height: 1.8;
    color: #495057;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

.stat-item {
    text-align: center;
    padding: 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #3498db 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .hero-section {
        padding: 60px 20px;
        margin: -20px -20px 30px -20px;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .feature-card {
        padding: 24px;
    }
    
    .about-section {
        padding: 30px 20px;
    }
}
</style>
{/block}

{block name="content"}
<div class="page-container">
    <!-- 英雄区域 -->
    <section class="hero-section">
        <h1 class="hero-title">电子名片生成器</h1>
        <p class="hero-subtitle">快速创建专业美观的电子名片，提升您的商务形象</p>
        <a href="/card/index" class="hero-cta">
            <span>🚀</span>
            立即开始创建
        </a>
    </section>
    
    <!-- 功能特性 -->
    <section class="features-grid">
        <div class="feature-card">
            <span class="feature-icon">📇</span>
            <h3 class="feature-title">智能名片生成</h3>
            <p class="feature-description">填写个人信息，选择部门和岗位，AI智能生成专业的电子名片，支持多种模板风格。</p>
            <a href="/card/index" class="feature-link">
                开始创建
                <span>→</span>
            </a>
        </div>
        
        <div class="feature-card">
            <span class="feature-icon">🏢</span>
            <h3 class="feature-title">部门管理</h3>
            <p class="feature-description">统一管理公司各个部门信息，为名片生成提供准确的组织架构支持。</p>
            <a href="/department/index" class="feature-link">
                管理部门
                <span>→</span>
            </a>
        </div>
        
        <div class="feature-card">
            <span class="feature-icon">💼</span>
            <h3 class="feature-title">岗位管理</h3>
            <p class="feature-description">精细化管理各部门岗位信息，确保职位的准确性和完整性。</p>
            <a href="/position/index" class="feature-link">
                管理岗位
                <span>→</span>
            </a>
        </div>
    </section>
    
    <!-- 统计数据 -->
    <section class="stats-section">
        <div class="stat-item">
            <span class="stat-number">1000+</span>
            <span class="stat-label">名片已生成</span>
        </div>
        <div class="stat-item">
            <span class="stat-number">50+</span>
            <span class="stat-label">企业用户</span>
        </div>
        <div class="stat-item">
            <span class="stat-number">99%</span>
            <span class="stat-label">用户满意度</span>
        </div>
        <div class="stat-item">
            <span class="stat-number">24/7</span>
            <span class="stat-label">在线服务</span>
        </div>
    </section>
    
    <!-- 关于系统 -->
    <section class="about-section">
        <h2 class="about-title">关于系统</h2>
        <div class="about-content">
            <p>电子名片生成器是一款基于ThinkPHP 8.0开发的现代化应用程序，采用响应式设计和现代化UI组件，为用户提供卓越的使用体验。系统支持智能部门和岗位管理，用户可以便捷地选择或自定义职位信息，生成的名片包含完整的联系方式和公司信息，支持多种格式导出和分享。</p>
        </div>
    </section>
</div>
{/block}

{block name="js"}
<script>
$(document).ready(function() {
    // 添加页面加载动画
    $('.feature-card').each(function(index) {
        $(this).css({
            'opacity': '0',
            'transform': 'translateY(30px)'
        }).delay(index * 200).animate({
            'opacity': '1'
        }, 600).css('transform', 'translateY(0)');
    });
    
    // 统计数字动画
    $('.stat-number').each(function() {
        const $this = $(this);
        const countTo = parseInt($this.text().replace(/[^\d]/g, ''));
        const originalText = $this.text();
        
        $({ countNum: 0 }).animate({
            countNum: countTo
        }, {
            duration: 2000,
            easing: 'swing',
            step: function() {
                const num = Math.floor(this.countNum);
                if (originalText.includes('+')) {
                    $this.text(num + '+');
                } else if (originalText.includes('%')) {
                    $this.text(num + '%');
                } else if (originalText.includes('/')) {
                    $this.text('24/7');
                } else {
                    $this.text(num);
                }
            },
            complete: function() {
                $this.text(originalText);
            }
        });
    });
});
</script>
{/block}